package com.meizi.core.tool.api;

import lombok.Data;

/**
 * @author meizi
 * @email enjoymeizi@gmail.com
 * @date 2020/11/27 14:05
 */
@Data
public class PageParam {
    /**
     * 每页数
     */
    private Integer pageSize = 10;
    /**
     * 当前页
     */
    private Integer pageNum = 1;
    /**
     * 总数
     */
    private Integer total = 0;

    public int getTotalPage() {
        return this.total / this.pageSize + (this.total % this.pageSize == 0 ? 0 : 1);
    }

}
